package com.cloudRestudy.customer.feign;

import com.cloudRestudy.common.core.result.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @ClassName : RemoteHystrixService
 * @Author : lby
 * @Date: 2021/7/31 9:48
 * @Description :
 * fallback = RemoteFallBack.class 可以给feign 开启统一降级处理
 * 需要在配置文件开启
 * feign:
 * hystrix:
 * enables: true
 */
@FeignClient(contextId = "remoteHystrixService", value = "CLOUD-HYSTRIX", fallback = RemoteFallBack.class)
public interface RemoteHystrixService {

    @GetMapping("/hystrix/success-msg")
    R getSuccessMsg();


    @GetMapping("/hystrix/error-msg")
    R getErrorMsg();
}
